package com.listener;

import com.servlet.ServeletB;
import com.servlet.ServeletC;

import javax.servlet.Registration;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import javax.servlet.ServletRegistration;
import javax.servlet.annotation.WebListener;

/**
 * Created by pengfei on 2017/7/24.
 */
@WebListener
public class MyServletContextListener implements ServletContextListener {

    public void contextDestroyed(ServletContextEvent sce) {
        System.out.println("ServletContex销毁");
    }

    public void contextInitialized(ServletContextEvent sce) {
        System.out.println("ServletContex初始化");
        System.out.println(sce.getServletContext().getServerInfo());

    }
}
